import request from '@/utils/request'

import { baseUrlConfig } from '@/config/config'
const basePath = baseUrlConfig.processBaseUrl

export interface PageListType {
  pageNum?: number
  pageSize?: number
  projectNo: string
  projectName: string
  constructionUnit: string
  changeTimeBegin: string
  changeTimeEnd: string
  date: []
  order:[]
}

// 获取数量
export const getTerminalTotal = () => {
  return request({
      url: basePath + '/cm/projectChange/getLocationNums',
      method: 'get'
  })
}

// 获取数量
export const getProjectTypeTotal = () => {
  return request({
      url: basePath + '/cm/projectChange/getTypeNums',
      method: 'get'
  })
}

// 删除
export const delData = (id: number) => {
  return request({
      url: basePath + '/cm/projectChange/delete',
      method: 'get',
      params: {id}
  })
}

// 获取分页列表
export const getPageList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/cm/projectChange/getList',
    method: 'post',
    data
  })
}

//导出
export const exportList = (data: any) => {
  return request({
    responseType: 'blob',
    url: basePath + "/cm/projectChange/export",
    method:'post',
    data:data
  })
}
